"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.鼓舞Handler = void 0;
const Config_1 = require("../../Config");
const GameUtils_1 = __importDefault(require("../GameUtils"));
const Big_1 = require("../core/Big");
const BaseHandler_1 = require("./BaseHandler");
class 鼓舞Handler extends BaseHandler_1.BaseHandler {
    鼓舞_嗜血狂战(data, player) {
        this.handlerMgr.spendAction(player, Config_1.Config.COST_鼓舞_嗜血狂战);
        player.arr_bigs.forEach(big => {
            if (big.evolution == Big_1.BigEvolution.未转型) {
                big.addState(Big_1.BigState.BLOODTHIRSTY);
            }
        });
        let startPoint = this.gameMgr.map_point.get(data.start);
        let big_start = startPoint.big;
        big_start.actionOnce();
        this.gameMgr.sendBroadcast(GameUtils_1.default.getObj("play_sound", { "sound": "鼓舞_鼓舞", "username": big_start.player.username }));
    }
    鼓舞_乘风破浪(data, player) {
        this.handlerMgr.spendAction(player, Config_1.Config.COST_鼓舞_乘风破浪);
        player.arr_bigs.forEach(big => {
            if (big.evolution == Big_1.BigEvolution.未转型) {
                big.addState(Big_1.BigState.WAVERIDER);
            }
        });
        let startPoint = this.gameMgr.map_point.get(data.start);
        let big_start = startPoint.big;
        big_start.actionOnce();
        this.gameMgr.sendBroadcast(GameUtils_1.default.getObj("play_sound", { "sound": "鼓舞_鼓舞", "username": big_start.player.username }));
    }
    鼓舞_生生不息(data, player) {
        this.handlerMgr.spendAction(player, Config_1.Config.COST_鼓舞_生生不息);
        player.arr_bigs.forEach(big => {
            if (big.evolution == Big_1.BigEvolution.未转型) {
                big.addState(Big_1.BigState.FERTILE);
            }
        });
        let startPoint = this.gameMgr.map_point.get(data.start);
        let big_start = startPoint.big;
        big_start.actionOnce();
        this.gameMgr.sendBroadcast(GameUtils_1.default.getObj("play_sound", { "sound": "鼓舞_鼓舞", "username": big_start.player.username }));
    }
    鼓舞_常胜将军(data, player) {
        this.handlerMgr.spendAction(player, Config_1.Config.COST_鼓舞_常胜将军);
        player.arr_bigs.forEach(big => {
            if (big.evolution == Big_1.BigEvolution.未转型) {
                big.addState(Big_1.BigState.HEROIC);
            }
        });
        let startPoint = this.gameMgr.map_point.get(data.start);
        let big_start = startPoint.big;
        big_start.actionOnce();
        this.gameMgr.sendBroadcast(GameUtils_1.default.getObj("play_sound", { "sound": "鼓舞_鼓舞", "username": big_start.player.username }));
    }
}
exports.鼓舞Handler = 鼓舞Handler;
